package com.itheima.demo.callable;

import java.util.concurrent.Callable;

public class MyCallable implements Callable<String> {//这个泛型表示要返回值的类型
    @Override
    public String call() throws Exception {
        for (int i = 0; i < 100; i++) {
            System.out.println(Thread.currentThread().getName()+"表白第"+(i+1)+"次");
        }
        return Thread.currentThread().getName()+"表白成功";
    }
}
